package com.gimi.cloud.bbp.dto.order;

import com.gimi.cloud.bbp.dto.base.PageDTO;
import com.gimi.cloud.bbp.dto.user.UserDTO;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.List;


/**
 * Created by shazhiwei on 2018/1/9.
 */
public class OrderDTO extends PageDTO {

	private static final long serialVersionUID = 1L;
    
    private Integer oId;
    /**
     * 用户ID
     */
    @NotNull(message = "userId不能为空",groups = {AddOrder.class})
    private Integer userId;
    /**
     * 订单编号,规则:14位年月日时分秒+4位随机码+7位自增id；7位自增id通过建立一个空表，使用空表的自增id作为当前值，不够7位的通过前端补0的方式完成
     */
    private String orderCode;
    /**
     * 自动确认收货时间,客户签收快递后多少天后默认客户已收货
     */
    private Integer confirmDay;
    /**
     * 活动信息
     */
    private Integer activityId;
    /**
     * 订单来源:app(app来源),wechat(微信),other(其他)
     */
    @NotBlank(message = "订单来源",groups = {AddOrder.class})
    private String orderSource;
    /**
     * 订单类型(ordinary普通,lease租赁)
     */
    @NotBlank(message = "订单类型不能为空",groups = {AddOrder.class})
    private String orderType;
    /**
     * 支付方式(lease租赁,stages分期付款,online在线付款,delivery货到付款) 订单类型为租赁支付方式为租赁
     */
    private String payType;
    
    /**
     * 支付渠道（ZFB：支付宝）
     */
    private String payChannel;
    
    /**
     * 配送方式(express快递,self自取)
     */
    private String distributionType;
    /**
     * 物流单号，配送方式为自取时物流单号为空
     */
    private String logisticsCode;
    /**
     * 订单状态(A01已提交待支付,A02支付成功待收货,A03已收货,A09取消;L01已提交审核中,L02审核成功待支付,L03审核拒绝,L04支付成功待收货,,L05已收货,L09取消
     */
    private String status;
    /**
     * 付款状态(pay已支付,nopay未支付) 订单为租赁类型时支付是支付押金、首期租金
     */
    private String payStatus;
    /**
     * 发货状态(yes已发货,no未发货,ing发货中)
     */
    private String logisticsStatus;
    /**
     * 发货单流水号
     */
    private String sendCode;
    /**
     * 订单商品
     */
    private List<OrderGoodsDTO> orderGoods;
    /**
     * 订单费用信息
     */
    private List<OrderCostDTO> orderCost;
    /**
     * 订单配送信息
     */
    private List<OrderExpressDTO> orderExpress;
    /**
     * 订单发票信息
     */
    private List<OrderInvoiceDTO> orderInvoice;
    /**
     * 订单物流信息
     */
    private List<OrderLogisticsDTO> orderLogistics;
    /**
     * 订单操作信息
     */
    private List<OrderOperDTO> orderOper;
    /**
     * 订单用户
     */
    private UserDTO user;
    
    public interface AddOrder{

    }
    
    
	public UserDTO getUser() {
		return user;
	}

	public void setUser(UserDTO user) {
		this.user = user;
	}

	public Integer getOId() {
        return oId;
    }

    public void setOId(Integer oId) {
        this.oId = oId;
    }

    /**
     * @return 用户ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * @param userId 用户ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public Integer getConfirmDay() {
        return confirmDay;
    }

    public void setConfirmDay(Integer confirmDay) {
        this.confirmDay = confirmDay;
    }

    /**
     * @return 活动信息
     */
    public Integer getActivityId() {
        return activityId;
    }

    /**
     * @param activityId 活动信息
     */
    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    /**
     * @return 订单来源:app(app来源),wechat(微信),other(其他)
     */
    public String getOrderSource() {
        return orderSource;
    }

    /**
     * @param orderSource 订单来源:app(app来源),wechat(微信),other(其他)
     */
    public void setOrderSource(String orderSource) {
        this.orderSource = orderSource;
    }

    /**
     * @return 订单类型(ordinary普通,lease租赁)
     */
    public String getOrderType() {
        return orderType;
    }

    /**
     * @param orderType 订单类型(ordinary普通,lease租赁)
     */
    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getDistributionType() {
        return distributionType;
    }

    public void setDistributionType(String distributionType) {
        this.distributionType = distributionType;
    }

    public String getLogisticsCode() {
        return logisticsCode;
    }

    public void setLogisticsCode(String logisticsCode) {
        this.logisticsCode = logisticsCode;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public String getLogisticsStatus() {
        return logisticsStatus;
    }

    public void setLogisticsStatus(String logisticsStatus) {
        this.logisticsStatus = logisticsStatus;
    }

    public String getSendCode() {
        return sendCode;
    }

    public void setSendCode(String sendCode) {
        this.sendCode = sendCode;
    }

    public void setOrderGoods(List<OrderGoodsDTO> orderGoods) {
		this.orderGoods = orderGoods;
	}

	public void setOrderCost(List<OrderCostDTO> orderCost) {
		this.orderCost = orderCost;
	}

	public List<OrderExpressDTO> getOrderExpress() {
		return orderExpress;
	}

	public void setOrderExpress(List<OrderExpressDTO> orderExpress) {
		this.orderExpress = orderExpress;
	}

	public List<OrderInvoiceDTO> getOrderInvoice() {
		return orderInvoice;
	}

	public void setOrderInvoice(List<OrderInvoiceDTO> orderInvoice) {
		this.orderInvoice = orderInvoice;
	}

	public List<OrderOperDTO> getOrderOper() {
		return orderOper;
	}

	public void setOrderOper(List<OrderOperDTO> orderOper) {
		this.orderOper = orderOper;
	}

	public List<OrderGoodsDTO> getOrderGoods() {
		return orderGoods;
	}

	public List<OrderCostDTO> getOrderCost() {
		return orderCost;
	}

	public List<OrderLogisticsDTO> getOrderLogistics() {
		return orderLogistics;
	}

	public void setOrderLogistics(List<OrderLogisticsDTO> orderLogistics) {
		this.orderLogistics = orderLogistics;
	}
	
	/**
	 * @return 支付渠道（ZFB：支付宝）
	 */
	public String getPayChannel() {
		return payChannel;
	}

	/**
	 * @param payChannel 支付渠道（ZFB：支付宝）
	 */
	public void setPayChannel(String payChannel) {
		this.payChannel = payChannel;
	}
	
}
